#!/usr/bin/env python
# encoding: utf-8
"""
@summary: 查找某个具体用户
@author: hongxingfan
@since: 2014年8月14日    下午4:32:41
"""
import sys

if __name__ == "__main__":
    
    result_hash = {}
    
    for line in sys.stdin:
        line = line.strip()
        cols = line.split("\t")
        
        suv = cols[0]
        fullUrl = cols[1]
        
        if suv in result_hash:
            result_hash.get(suv).append(fullUrl)
        else:
            result_hash[suv] = [fullUrl]
            
    for (key, value) in result_hash.items():
        print("%s\t%s" % (key, value))
